import React from 'react';
import { Tooltip } from 'antd';
import { history } from 'umi'
import { newTabProps } from '@/utils/tab';
// import AuthComponent from '@/utils/auth/AuthComponent';

import BizIcon from '@/components/BizIcon';

export default function NoticeLink({ title = '查看详情', type = 'chakanxiangqing', params = {}, pathname }) {
    return (
        // <AuthComponent code="office:recruitment:course:hire:detail:offer">
        <Tooltip title={title}>
            <BizIcon
                type={type}
                onClick={() => {
                    // window.open(`/office/personnelManagement/onboardAndLeave/informal/process/detail?${qs.stringify(params)}`);
                    history.push({
                        pathname,
                        query: params,
                        ...newTabProps
                    });
                }}
            />
        </Tooltip>
        // </AuthComponent>
    );
}
